// 项目的根组件, 是一切组件的根基, 一切组件都是从这里向下发散的

import { useDispatch, useSelector } from "react-redux"
import { decrement, increment } from "./store/modules/channelStore"
// 导入actionCreater

function App() {
  const { count } = useSelector(state => state.counter)
  const dispatch = useDispatch()
  return (
    <div className="App">
      <button onClick={() => dispatch(decrement())}>-</button>
      {count}
      <button onClick={() => dispatch(increment())}>+</button>
    </div>
  )
}
export default App
